import request from '@/utils/request'

// 查询发行管理列表
export function listEquityCardIssue(query) {
  return request({
    url: '/equityManager/equityCardIssue/list',
    method: 'get',
    params: query
  })
}
// 数字权益卡选择列表
export function cardSelectLs(query) {
  return request({
    url: '/equityManager/equityCardIssue/select/list',
    method: 'get',
    params: query
  })
}
// 新增发行管理
export function addEquityCardIssue(data) {
  return request({
    url: '/equityManager/equityCardIssue',
    method: 'post',
    data: data
  })
}

// 修改发行管理
export function updateEquityCardIssue(data) {
  return request({
    url: '/equityManager/equityCardIssue',
    method: 'put',
    data: data
  })
}
// 查询发行管理详细
export function getEquityCardIssue(id) {
  return request({
    url: '/equityManager/equityCardIssue/' + id,
    method: 'get'
  })
}
// 发行上下架
export function updateIssueStatus(data) {
  return request({
    url: '/equityManager/equityCardIssue/updateIssueStatus',
    method: 'put',
    data: data
  })
}
// 当前售罄
export function soldOut(data) {
  return request({
    url: '/equityManager/equityCardIssue/soldOut',
    method: 'put',
    data: data
  })
}
// 添加白名单用户
export function addWhite(data) {
  return request({
    url: '/equityManager/equityCardIssue/addWhite',
    method: 'put',
    data: data
  })
}
// 优先抢购白名单
export function whiteList(query) {
  return request({
    url: '/equityManager/equityCardIssue/white/list',
    method: 'get',
    params: query
  })
}
// 删除白名单用户
export function deleteWhite(id) {
  return request({
    url: `/equityManager/equityCardIssue/deleteWhite/${id}`,
    method: 'put',
  })
}
// 更新白名单
export function refreshWhite(data) {
  return request({
    url: `/equityManager/equityCardIssue/refreshWhite`,
    method: 'put',
    data: data
  })
}
// 预约明细列表
export function subscribeList(query) {
  return request({
    url: '/equityManager/equityCardIssue/subscribe/list',
    method: 'get',
    params: query
  })
}
//设置排序号
export function equityCardIssueSort(data) {
  return request({
    url: `/equityManager/equityCardIssue/sort`,
    method: 'put',
    data: data
  })
}
// 打入神椰帐号
export function sendShenyeAccount(id) {
  return request({
    url: `/equityManager/equityCardIssue/send/shenye/account/${id}`,
    method: 'put',
  })
}
// 保存虚拟人数
export function virtualSubscribe(params) {
  return request({
    url: '/equityManager/equityCardIssue/virtual/subscribe',
    method: 'put',
    params
  })
}

// 发行管理批量上下架
export function updateBatchSellStatus(data) {
  return request({
    url: '/merchant/equity/card/issue/batch/sell/status',
    method: 'put',
     data
  })
}